/***********************************************************************
 * Module:  Maillog.java
 * Author:  Administrator
 * Purpose: Defines the Class Maillog
 ***********************************************************************/
package com.sogoodsoft.entity.common;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import com.sogoodsoft.entity.IdEntity;
import com.sogoodsoft.entity.account.User;
import com.sogoodsoft.entity.app.SysClass;

/** 邮件发送日志 */
@Entity
@Table(name = "MAILLOG")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class Maillog extends IdEntity {

	/** 发送邮件的邮箱 */
	public java.lang.String mailFrom;
	
	/** 接收邮件的邮箱 */
	public java.lang.String mailTo;
	/** 邮件主题 */
	public java.lang.String subject;
	/** 邮件内容 */
	public java.lang.String mail;
	/** 发送时间 */
	public java.util.Date mailTime;

	public SysClass sysClass;
	public User user;
	
	/** 关联审核结果 */
	public Long assId;

	@Column(name="MAIL_FROM")
	public java.lang.String getMailFrom() {
		return mailFrom;
	}

	public void setMailFrom(java.lang.String mailFrom) {
		this.mailFrom = mailFrom;
	}

	@Column(name="MAIL_TO")
	public java.lang.String getMailTo() {
		return mailTo;
	}

	public void setMailTo(java.lang.String mailTo) {
		this.mailTo = mailTo;
	}

	public java.lang.String getSubject() {
		return subject;
	}

	public void setSubject(java.lang.String subject) {
		this.subject = subject;
	}

	public java.lang.String getMail() {
		return mail;
	}

	public void setMail(java.lang.String mail) {
		this.mail = mail;
	}

	@Column(name="MAIL_TIME")
	public java.util.Date getMailTime() {
		return mailTime;
	}

	public void setMailTime(java.util.Date mailTime) {
		this.mailTime = mailTime;
	}

	@ManyToOne(cascade={CascadeType.REFRESH,CascadeType.MERGE},optional=true)
	@JoinColumn(name="MAIL_STATUS")
	public SysClass getSysClass() {
		return sysClass;
	}

	public void setSysClass(SysClass sysClass) {
		this.sysClass = sysClass;
	}

	@ManyToOne(cascade={CascadeType.REFRESH,CascadeType.MERGE},optional=true)
	@JoinColumn(name="CURR_USER")
	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	@Column(name="ASS_ID")
	public Long getAssId() {
		return assId;
	}

	public void setAssId(Long assId) {
		this.assId = assId;
	}

}